#pragma once
#include "cpu/vision.h"

#ifdef WITH_CUDA
#include "cuda/vision.h"
#endif


inline at::Tensor star_dcn_offset(
                    at::Tensor bbox_pred, 
                    at::Tensor dcn_base_offset, 
                    at::Tensor grad_mul_idx, 
                    at::Tensor direction,
                    int num_dconv_points, 
                    float gradient_mul, 
                    int stride) {
    if(bbox_pred.type().is_cuda() && dcn_base_offset.type().is_cuda()) {
#ifdef WITH_CUDA
    return star_dcn_offset_cuda(bbox_pred, 
                                dcn_base_offset, 
                                grad_mul_idx, 
                                direction,
                                num_dconv_points, 
                                gradient_mul, 
                                stride);
#else
    AT_ERROR("Not Compatible with CPU");
#endif
    }
    AT_ERROR("Not Implement on CPU");
}
